﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Touch2Like.Model;
using System.Data;
using Touch2Like.DAL;
using Touch2Like.SharedLibrary;

namespace Touch2Like.Web.Product
{
    public partial class CheckOut : System.Web.UI.Page
    {
//        protected void Page_Load(object sender, EventArgs e)
//        {
//            if (!IsPostBack)
//            {
//                btn_ReviewOrder.PostBackUrl = "~/goods/OrderConfirmation.aspx?OrderID=" + Request["OrderID"];

//                if (WebUtility.UserGUID == "0")
//                {
//                    cb_CreateAccount.Visible = true;
//                    tb_Password.Visible = true;
//                    tb_Password1.Visible = true;
//                }
//                else
//                {
//                    Touch2Like.DAL.UserDAL user = new Touch2Like.DAL.UserDAL();
//                    UserInfo userInfo = user.GetUserByUserGuid(WebUtility.UserGUID);

//                    if (userInfo != null)
//                    {
//                        tb_Phone.Text = userInfo.Phone;
//                        tb_Email.Text = userInfo.Email;
//                    }
//                }

//                OrderDAL order = new OrderDAL();
//                OrderInfo orderInfo = order.GetByID(Convert.ToInt32(Utility.Encryption.Decrypt(Request["OrderID"])));

//                if (orderInfo != null)
//                {
//                    lb_TotalPrice.Text = "<span class='totalprice' orderprice='" + orderInfo.TotalPrice + "'>" + Utility.GetPriceString(orderInfo.TotalPrice + Convert.ToDecimal(rbl_Shipping.SelectedValue)) + "</span>";

//                    ShoppingCartDAL cart = new ShoppingCartDAL();

//                    Repeater_Cart.DataSource = cart.GetByOrderNumber(orderInfo.OrderNumber);
//                    Repeater_Cart.DataBind();
//                }
//            }
//        }

//        public string GetSubTotal(object price, object count)
//        {
//            if (DataHelper.GetDouble(price) != null && DataHelper.GetInt(count) != null)
//            {
//                return Utility.GetPriceString(DataHelper.GetDouble(price).Value * DataHelper.GetInt(count).Value);
//            }

//            return "0.00";
//        }

//        protected void btn_ReviewOrder_Click(object sender, EventArgs e)
//        {

//        }
    }
}